﻿Imports System.Data.SqlClient
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Public Class R_HoaDon
    Dim obj As ReportDocument
    Dim cls As New Cls_DanhMuc
    Private Sub R_HoaDon_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        obj = New Report_HoaDon
        Dim mydt As New DataTable
        Dim str As String = "select * from V_RHoaDon where mahd='" & Frm_HoaDon.txtmahd.Text.Trim & "'"
        cls.GetValue(mydt, str)
        obj.SetDataSource(mydt)
        CrystalReportViewer1.ReportSource = obj
        CrystalReportViewer1.Refresh()

    End Sub
End Class